from pydantic import BaseModel
from typing import List
from datetime import datetime, date

# 单个时间槽的预测结果
class PredictedPoint(BaseModel):
    time_slot: datetime
    predicted_net_flow: float

# 单个社区的完整预测序列
class CommunityPredictionSeries(BaseModel):
    community_id: int
    series: List[PredictedPoint]

class DailyPredictionData(BaseModel):
    prediction_for_date: date
    predictions: List[CommunityPredictionSeries]

class DailyPredictionResponse(BaseModel):
    code: int
    message: str
    data: DailyPredictionData